package repo

import (
	"gitee.com/CrazyMage/lite-note/internal/entity"
)

type (
	UserRepo interface {
		CreateUser(user *entity.User) error
		FindUserByUserName(username string) (user *entity.User, err error)
	}

	NoteRepo interface {
		CreateNote(note *entity.Note) error

		ListNodeByPages(uid uint, pageNumber, pageSize int) (*[]entity.Note, error)

		GetNoteById(id int) (*entity.Note, error)

		DelNoteById(id int) error

		UpdateNoteById(note *entity.Note) error

		QueryByTitle(uid int, title string) (*[]entity.Note, error)
	}
)
